
using System;
using System.ComponentModel.DataAnnotations;
using System.ComponentModel.DataAnnotations.Schema;

namespace Models.Entity
{
    /// <summary>
    /// 每周课表
    /// </summary>
    [Table(@"c_classes_week_course a 
            left join c_classes b on a.classes_id=b.classes_id  
            left join c_week_course c on a.week_course_id=c.week_course_id 
            left join c_teacher_course f on f.teacher_course_id=c.teacher_course_id 
            left join c_teacher d on d.teacher_id=f.teacher_id 
            left join c_course e on f.course_id=e.course_id  
             ")]
    public class CClassesWeekCourseEntityView : BaseModel
    {

        /// <summary>
        /// week_course_ids
        /// </summary>
        [Key]
        [Required]
        [Column("c.week_course_id")]
        public int week_course_id { get; set; }
        /// <summary>
        /// teacher_id
        /// </summary>
        [Column("d.teacher_id")]
        public int teacher_id { get; set; }
        /// <summary>
        /// 年份
        /// </summary>
        [Required]
        [Column("c.years")]
        public int years { get; set; }
        /// <summary>
        /// 编号
        /// </summary>
        [Required]
        [Column("c.num")]
        public int num { get; set; }
        /// <summary>
        /// 状态:0:禁用,1生效
        /// </summary>
        [Required]
        [Column("c.status")]
        public int status { get; set; }
        /// <summary>
        /// 序号,共两位，第一位指每天第几节，第二位是星期
        /// </summary>
        [Column("c.order_num")]
        public int order_num { get; set; }

        /// <summary>
        /// 地址
        /// </summary>
        /// <value></value>
        [Column("c.address")]
        public string address { get; set; }


        /// <summary>
        /// classes_id
        /// </summary>
        [Required]
        [Column("b.classes_id")]
        public int classes_id { get; set; }
        /// <summary>
        /// 班级名称
        /// </summary>
        [Required]
        [StringLength(20)]
        [Column("b.name")]
        public string classes_name { get; set; }

        /// <summary>
        /// 教师名称
        /// </summary>
        [Required]
        [StringLength(20)]
        [Column("d.name")]
        public string teacher_name { get; set; }

        /// <summary>
        /// 课程名称
        /// </summary>
        [Required]
        [StringLength(20)]
        [Column("e.name")]
        public string course_name { get; set; }
    }
}
